import axios from "axios";
import app from "../main.ts";

const instance = axios.create({
    baseURL: import.meta.env.VITE_BACKEND_HOST,
    timeout: 10000
})
instance.interceptors.request.use(config => {
    config.headers['Authorization'] = 'test'
    return config
}, err => {
    console.log(err)
    return Promise.reject(err);
})
instance.interceptors.response.use(res => {
    return res.data
}, err => {
    console.log(err)
    return Promise.reject(err)
})
export default instance
